package com.sunlands.zlcx.usercenter.constant;

/**
 * 学习状态
 */
public enum MessageStatus {

    LEARN_TIMING_ME("learn_timing_me","你开始了学习", 700),
    LEARN_TIMING_FRIEND("learn_timing_friend", "TA开始了学习", 701),
    LEARN_TIMING_ME_OVER("learn_timing_me_over","你完成了学习", 702),
    LEARN_TIMING_FRIEND_OVER("learn_timing_friend_over", "TA完成了学习", 703),


    LIAN_MAI_TIMING_ME("lian_mai_timing_me", "你开始了学习", 704),
    LIAN_MAI_TIMING_FRIEND("lian_mai_timing_friend", "TA开始了学习", 705),
    LIAN_MAI_TIMING_ME_OVER("lian_mai_timing_me_over", "你完成了学习", 706),
    LIAN_MAI_TIMING_FRIEND_OVER("lian_mai_timing_friend_over", "TA完成了学习", 707),

    TARGET_SELECT_ME("target_select_me", "你选择了新的学习目标", 708),
    TARGET_SELECT_FRIEND("target_select_friend", "TA选择了新的学习目标", 709),

    TARGET_DELETE_ME("target_delete_me", "你删除了学习", 710),
    TARGET_DELETE_FRIEND("target_delete_friend", "TA删除了学习", 711),
    TARGET_OVER_ME("target_over_me", "你归档了学习目标", 712),
    TARGET_OVER_FRIEND("target_over_friend", "TA归档了学习目标", 713),

    ;

    MessageStatus(String info, String tips, int code) {
        this.info = info;
        this.tips = tips;
        this.code = code;
    }

    private String info;
    private String tips;
    private int code;

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public static MessageStatus getMessageStatus(int code) {
        for (MessageStatus field : MessageStatus.values()) {
            if (code == field.getCode()) {
                return field;
            }
        }
        return null;
    }
}
